Determining XML schema type equivalence

ABSTRACT

XML schema types can be identified and compared for equivalence so as to avoid unnecessary and undesirable creation of multiple classes for equivalent schema types. XML schema types having the same name are identified and normalized according to a unified system for representing schema types. The step for normalizing schema types can include any writing and/or rewriting at least a portion of the schema types into a common unifying format so that they can be compared. Once the schema types have been normalized, they are then compared for equivalence. One technique for comparing the schema types is to create and compare hash numbers of all or only selected portions of the normalized schema types. Equivalent schema types can then be indexed to share a single class, thereby avoiding the creation of multiple classes for equivalent schema types.

BACKGROUND OF THE INVENTION

1. The Field of the Invention

The present invention relates to methods and systems utilizingeXtensible Markup Language (XML) documents and services and, moreparticularly, to methods and systems for determining type equivalencebetween different XML schemas.

2. Background and Relevant Art

XML schemas are well-known in the computing industry. They can be used,for example, to define XML documents in a structured format so thatcorresponding XML data can be shared and accessed by genericapplications. XML schemas can be processed by various programs togenerate code for accessing the XML data. For example, a program cananalyze a schema and create classes that can be used for extracting andutilizing the XML data, as defined by the schema types. In other words,an XML schema can be thought of as input and the resulting code andclasses that are used to extract and utilize the XML data can be thoughtof as the output.

With specific regard to the Internet, as well as intranets, manyapplications expose multiple Web services that share a subset of schematypes as defined in the services' Web Service Description Language(WSDL) contract. A consumer of such services will want to share theequivalent types between Web service proxies generated from the WSDL. Tosolve this problem one must solve the problem of determining equivalenceof types, as defined in the consumed Web services' contract. This,however, is easier said then done because XML grammar for definingschema types includes the ability to define defaults at various scopes,certain insensitivities to order, and permissible annotations. Thesevariations can thereby cause two different schema type definitions toyield equivalent schema types. In addition, XML schema documents aretypically serialized to XML 1.0 which introduces yet another set ofvariations due to the XML 1.0 serialization rules.

For example, FIG. 1 illustrates two examples 110 and 120 of equivalentschema type definitions for the same type, named Order. Initially, itwill be noted that the syntax can be altered between equivalent schematypes. For instance, example 110 includes a target namespace reflectedin double quotations 130, while example 140 includes the same targetnamespace reflected in single quotations 140.

In the present examples 110 and 120, the indentation and spacing is alsodifferent. For instance the indentation of definition lines 150 and 152is more uniform and pronounced than the indentation of correspondingdefinition lines 160 and 162.

The presentation order of the type definitions 170 and 172 from thefirst example 110 is also inconsistent with the presentation order ofthe corresponding type definitions 180 and 182 for the second example120.

Finally, FIG. 1 also illustrates how various components of the schematypes are discretionary and can be included or omitted, such as, forexample, the components found in lines 190, 192, 194 and 196.

Accordingly, it has been shown how certain components of equivalentschema types can be presented differently. Because of this, it isimportant to identify the equivalent types so that only a single classis created for equivalent types within the shared schemas that are beingconsumed by the applications. Otherwise, the applications utilizing theredundant classes will become incompatible or fail to run properly.Similarly, it is important that different schema types are notidentified by the same name, or else they will also fail to runproperly.

For example, consider a situation in which there are two differentschemas, a payroll schema and a human resource schema. In this example,the schemas include employee types that are equivalent, but notidentical, and that will ultimately be used to create correspondingemployee classes for accessing employee data. However, because theemployee schema types are not identical, two different classes will becreated, instead of only one. This creation of duplicate classes notonly represents wasted resources, it can also cause some programs tofail, depending on how the data is being accessed and used.

These problems can become even more pronounced when considering that theschemas can change over time as customers customize their programs withnew type definitions to accommodate new functionality and whenapplications are configured to consume or utilize additional schemas.Furthermore, when considering that the W3C permits the creation ofcustom schema types, it is also apparent that this is room for a largequantity of equivalent schema types to be created. In particular,although there are certain defaults for creating custom types, there isalso a lot of flexibility for creating and defining equivalent typesdifferently.

For at least the foregoing reasons, it should be apparent that it wouldbe desirable to determine which schema types are equivalent prior tocreating the classes from the schemas, so as to avoid creating multipleclasses for equivalent schema types. Unfortunately, equivalence cannotbe determined by merely looking at the names or definitions of theschema types because of the many different ways equivalent schema typescan be represented.

Accordingly, it is currently necessary for a customer having problemsresulting from the creation of multiple classes for equivalent schematypes to edit the code created from the XML schema(s) so that only onetype definition exists and to delete the redundant secondary class(es).This, however, is cumbersome and is analogous to putting out a fire onlyafter you have been burned.

Accordingly, there is currently a need in the art for techniques todetermine equivalence between schema types and to prevent the fire fromeven starting.

BRIEF SUMMARY OF THE INVENTION

The present invention is generally directed to methods, systems andcomputer program products for determining equivalence of XML schematypes.

According to one embodiment, two or more XML schema types areidentified. In order to determine whether they are equivalent, it isfirst determined whether they have the same qualified name. Thereafter,XML schema types having the same qualified name are normalized accordingto a unified system for representing schema types.

The step for normalizing the schema types can include any acts ofwriting or rewriting components of the schema. For example, normalizingthe schema types can include, but is not limited to, such things aswriting missing discretionary components, ordering components in aparticular order, such as an alphabetical order, stripping or modifyingformatting white spaces, modifying syntax, etc. It will be appreciated,however, that because there are virtually an infinite number of formatsand techniques for normalizing disparately defined schema types anddefinitions, the presented invention is not limited to any particularnormalizing format or technique specifically referred to herein. Rather,the invention extends more broadly to any method or systems in whichequivalent schema types are normalized by writing or rewriting at leasta portion of the equivalent schema types into a common unifying formatso that they can be compared.

Once the schema types have been normalized, they are then compared forequivalence. One technique for comparing the schema types is to createand compare hash numbers of all or only selected portions of thenormalized schema types. It will be appreciated, however, thatessentially any comparison technique can be used.

If it is determined that the schema types are equivalent, they can thenbe indexed and used to create a single class, rather than multipleclasses for each of the equivalent schema types.

Additional features and advantages of the invention will be set forth inthe description which follows, and in part will be obvious from thedescription, or may be learned by the practice of the invention. Thefeatures and advantages of the invention may be realized and obtained bymeans of the instruments and combinations particularly pointed out inthe appended claims. These and other features of the present inventionwill become more fully apparent from the following description andappended claims, or may be learned by the practice of the invention asset forth hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the manner in which the above-recited and otheradvantages and features of the invention can be obtained, a moreparticular description of the invention briefly described above will berendered by reference to specific embodiments thereof which areillustrated in the appended drawings. Understanding that these drawingsdepict only typical embodiments of the invention and are not thereforeto be considered to be limiting of its scope, the invention will bedescribed and explained with additional specificity and detail throughthe use of the accompanying drawings in which:

FIG. 1 illustrates two examples of XML schema types.

FIG. 2 illustrates a flowchart of one embodiment of a method fordetermining equivalence of XML schema types.

FIG. 3 illustrates three embodiments of three XML schema types havingchildren represented in different order.

FIG. 4 illustrates a block diagram of one embodiment of a computingenvironment that may be used while performing methods of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention extends to methods, systems and computer programproducts for determining equivalence of XML schema types.

Certain definitions will now be provided to assist in the interpretationof the invention, as described and claimed herein.

The term “XML schema,” as defined herein, should be broadly construed toinclude any XML structure configured to define the building blocks of anXML document and that includes at least one schema type. Accordingly,although the present application includes references and claims directedspecifically to W3C XML Schemas, it will be appreciated that the scopeof the invention extends even more broadly to any data structure thatcan be used to define XML types and data.

The term “schema type,” as defined herein, should be broadly construedto include the portion of an XML schema that is used to create a classfor subsequent application to XML data. Schema types, which arewell-known to those of skill in the art can include, but are not limitedto string types, decimal types, integer types, Boolean types, datetypes, time types, and all of which can be written in different formats.As described herein, the term schema types can include both complex andsimple types.

The term “XML” data generally refers to any data that can be utilized orreferenced in a XML document. XML data can include essentially any datastored in an XML format.

The term “component,” which is used in relation to the definitionalcomponents of a schema type, can include, but are not limited to typedefinitions, attributes, children, particles, names, elements,formatting and syntax. Components are also described herein as sometimesbeing discretionary or interchangeable. In other words, some componentscan be presented in different formats or not at all, without affectingthe definition of a type. Accordingly, multiple equivalent schema typescan have similar or dissimilar discretionary components that can benormalized into a single unified form. The discretionary components mayor may not affect a determination of equivalence, as described herein,depending on how the defaults are set.

The term “normalizing,” as described herein, refers to writing orrewriting components of the schema types into a single unified format.

As further described herein, embodiments of the present invention caninclude special purpose and general-purpose computing devices includingvarious computer hardware and software, as discussed in greater detailbelow. The embodiments within the scope of the present invention canalso include computer-readable media for carrying or havingcomputer-executable instructions or data structures stored thereon. Suchcomputer-readable media can be any available media that can be accessedby a general purpose or special purpose computer. By way of example, andnot limitation, such computer-readable media can comprise RAM, ROM,EEPROM, CD-ROM or other optical disk storage, magnetic disk storage orother magnetic storage devices, or any other medium which can be used tocarry or store desired program code means or modules in the form ofcomputer-executable instructions or data structures and which can beaccessed by a general purpose or special purpose computer.

When information is transferred or provided over a network or anothercommunications connection (either hardwired, wireless, or a combinationof hardwired or wireless) to a computer, the computer properly views theconnection as a computer-readable medium. Thus, any such connection isproperly termed a computer-readable medium. Combinations of the aboveshould also be included within the scope of computer-readable media.Computer-executable instructions comprise, for example, instructions anddata which cause a general purpose computer, special purpose computer,or special purpose processing device to perform a certain function orgroup of functions.

Embodiments of the invention for determining equivalence of schema datatypes will now be described with particular reference to FIGS. 1-4.

FIG. 1, which was described above, illustrates two examples ofequivalent XML schema types named Order. As described, this Figure hasbeen provided to illustrate how equivalent XML schema types can havevarious components that are presented in different formats. In fact,some components may be discretionary components that are not explicitlyrecited at all. Because of this, multiple classes are often created torepresent the same data, thereby wasting computing resources andpotentially creating problems with the applications accessing the data.Accordingly, there is a need to determine the equivalence of schematypes before the classes are created so that a single class can becreated and assigned to the equivalent schema types. Otherwise, acustomer will have to edit the code created by the schema to propagateone of the classes throughout the code, and delete the other.

FIG. 2 illustrates a flowchart of one embodiment of a method fordetermining equivalence of XML schema types. As shown, the methodincludes various acts and steps that can be performed, for example, bythe modules of a computing system.

The first illustrated act includes identifying XML schema types that areto be compared for equivalence. This can be performed, for example, byloading one or more schemas having one or more schema types and scanningfor schema types having the same name or qname. For example, withreference to FIG. 1, the two schema types each contain the same qname,which essentially comprises the combination of the targetNamespace(http://tempuri.org/exampleOrder) and complextype name (Order). In somecircumstances, however, only the name is used to identify XML schematypes to be compared. This can be is useful, for example, whenequivalent schema types are referenced at different places, such asdifferent WSDL (Web Service Description Language) contracts.

Next, the method includes the step for normalizing the identified XMLschema types (step 220). As mentioned above, the step for normalizingcan include various different techniques and formulas. Accordingly, itwill be appreciated that the invention is not limited to any particularnormalizing technique or formula. In fact, it is not even necessary theentire XML schema type be normalized. Accordingly, in some embodiments,only one or more discrete portions of the XML schema types arenormalized.

The step for normalizing essentially comprises writing or rewriting oneor more portions of the XML schema type into a unifying format, suchthat each of two or more different schema types to be compared arewritten into the same format. The step for normalizing is recited inmeans plus function language. Accordingly, it will be appreciated thatthe step for normalizing can be performed by performing any combinationof corresponding acts that are sufficient for writing/rewriting at leasta portion of the identified XML schema types into a unifying format.

According to the illustrated embodiment, the step for normalizing (step220) includes the corresponding acts of identifying the one or moreschema components that can be presented differently in equivalent XMLschema types (act 224) and rewriting the components in a unified format(act 225).

The act of identifying the one or more schema components that can bepresented differently in equivalent XML schema types (act 224) caninclude, but is not limited to such things as identifying discretionarycomponents or definitions that are explicitly recited or omitted andidentifying a plurality or list of components (e.g., attributes,children, etc.) that are written in a particular order. In order toperform these acts, a computing module can be configured to look forparticular patterns or key terms. The schema can also be written to anobject model, so as to facilitate the search for particular knownobjects.

The act of rewriting the components (act 226), once they are identified(act 224), can also include rewriting a group or list of components intoa predetermined order, such as an alphabetical or numerical order.Rewriting the components can also include omitting white formattingspaces, deleting/omitting discretionary components that were included inthe schema type definitions, writing discretionary components that weremissing, and modifying certain syntax.

FIG. 3 illustrates one example, in which two equivalent XML schema typeshaving children represented in different sequence/order can benormalized into a common format.

As shown, a first schema type 200, named Data, includes three childrencomponents 220, 222 and 224, providing min and max values for othernamed types I, s and list, respectively. Inasmuch as the enclosingparticle 226 does not specify or reflect any significance to the orderof the children 220, 222 and 224, it should be appreciated that thelisted order of the children 220, 222, and 224 is arbitrary ordiscretionary.

Likewise, the second schema type, 230, also named Data, has threecorresponding children components 240, 242 and 244, each of which areidentical to the corresponding children 220, 222 and 224 of the firstschema type 200, only presented in a different order. Their sequence isalso discretionary, however, inasmuch as the enclosing particle 246 doesnot designate or require a particular order. Other examples of enclosingparticles that do not require a particular order include <any> and<choice>.

When order is not required, a normalizing function can be applied to theschema types 200 and 230 so that the identified children components arerewritten into a predetermined format, such as the alphabetical formatreflected by normalized schema type 250, in which children 260, 262 and264 are alphabetized by name. This, however, is merely illustrative ofone technique in which the schema types can be normalized. Othertechniques and formulas can also be applied to normalize the definitionsor components in different ways.

If, however, a particular order is required, as could be designated byan enclosing particle <sequence>, the normalizing function should avoidaltering the recited order of the components. Likewise, if the componentpresence or syntax is absolutely required, a normalizing function shouldavoid omitting that component or altering the syntax.

Once the schema types are normalized into a unified format, they can becompared to each other directly or indirectly, in entirety or partially,to determine their equivalence (step 230). For example, according to oneembodiment, a hash number is created (act 232) for the normalized XMLschema types by applying a simple hashing algorithm to the schema types(either in their entirety, or any portion(s) thereof). Thereafter, thehash numbers can be compared (act 234). If the hash numbers are thesame, it is determined that the schema types are equivalent. Likewise,if the hash numbers differ, it can be determined that the schema typesare not equivalent.

It will be appreciated, however, that step 230 can also be performedthrough other corresponding acts, such as, for example, comparing two ormore components textually, by bit size, or by any other technique. Whatis important is that the equivalence is determined by comparing the XMLschema types, or at least certain portions of the schema types, onlyafter they have been normalized.

Thereafter, if equivalence is determined, the equivalent schema typescan be indexed for future reference, and such that only a single classis created by the applications utilizing the schemas that include theequivalent schema types.

If equivalence is not determined, then it may be necessary to create anew class for each of the schema types. Alternatively, it may benecessary to continue comparing one or more of the schema types withadditional schema types until all of the schema types within theapplicable schemas have been exhausted.

In summary, it will be appreciated that the present invention providesmethods and systems for determining equivalence of XML schema types andin such a way as to overcome many of the problems associated with theprior art. In particular, it should be apparent that by practicing theinvention it is possible to avoid the creation of multiple classes fromequivalent schema types, thereby saving computing resources and enablingsome applications to utilize multiple schemas and to share XML datawithout crashing due to having too many classes that are associated withthe same data.

Computing Environment

The various acts and steps that have been described above can beperformed by any number of computing modules and systems and networkcomputing environments with various configurations, including personalcomputers, hand-held devices, multi-processor systems,microprocessor-based or programmable consumer electronics, network PCs,minicomputers, mainframe computers, and the like. The invention may alsobe practiced in distributed computing environments where tasks areperformed by local and remote processing devices that are linked (eitherby hardwired links, wireless links, or by a combination of hardwired orwireless links) through a communications network. In a distributedcomputing environment, program modules may be located in both local andremote memory storage devices.

With reference to FIG. 4, an exemplary system for implementing theinvention includes a general purpose computing device in the form of aconventional computer 420, including a processing unit 421, a systemmemory 422, and a system bus 423 that couples various system componentsincluding the system memory 422 to the processing unit 421. The systembus 423 may be any of several types of bus structures including a memorybus or memory controller, a peripheral bus, and a local bus using any ofa variety of bus architectures. The system memory includes read onlymemory (ROM) 424 and random access memory (RAM) 425. A basicinput/output system (BIOS) 426, containing the basic routines that helptransfer information between elements within the computer 420, such asduring start-up, may be stored in ROM 424.

The computer 420 may also include a magnetic hard disk drive 427 forreading from and writing to a magnetic hard disk 439, a magnetic diskdrive 428 for reading from or writing to a removable magnetic disk 429,and an optical disk drive 430 for reading from or writing to removableoptical disk 431 such as a CD-ROM, DVD-ROM or other optical media. Themagnetic hard disk drive 427, magnetic disk drive 428, and optical diskdrive 430 are connected to the system bus 423 by a hard disk driveinterface 432, a magnetic disk drive-interface 433, and an optical driveinterface 434, respectively. The drives and their associatedcomputer-readable media provide nonvolatile storage ofcomputer-executable instructions, data structures, program modules andother data for the computer 420. Although the exemplary environmentdescribed herein employs a magnetic hard disk 439, a removable magneticdisk 429 and a removable optical disk 431, other types of computerreadable media for storing data can be used, including magneticcassettes, flash memory cards, digital versatile disks, Bernoullicartridges, RAMs, ROMs, and the like.

Program code means comprising one or more program modules may be storedon the hard disk 439, magnetic disk 429, optical disk 431, ROM 424 orRAM 425, including an operating system 435, one or more applicationprograms 436, other program modules 437, and program data 438. A usermay enter commands and information into the computer 420 throughkeyboard 440, pointing device 442, or other input devices (not shown),such as a microphone, joy stick, game pad, satellite dish, scanner, orthe like. These and other input devices are often connected to theprocessing unit 421 through a serial port interface 446 coupled tosystem bus 423. Alternatively, the input devices may be connected byother interfaces, such as a parallel port, a game port or a universalserial bus (USB). A monitor 447 or another display device is alsoconnected to system bus 423 via an interface, such as video adapter 448.In addition to the monitor, personal computers typically include otherperipheral output devices (not shown), such as speakers and printers.

The computer 420 may operate in a networked environment using logicalconnections to one or more remote computers, such as remote computers449 a and 449 b. Remote computers 449 a and 449 b may each be anotherpersonal computer, a server, a router, a network PC, a peer device orother common network node, and typically include many or all of theelements described above relative to the computer 420, although onlymemory storage devices 450 a and 450 b and their associated applicationprograms 436 a and 436 b have been illustrated in FIG. 4. The logicalconnections depicted in FIG. 4 include a local area network (LAN) 451and a wide area network (WAN) 452 that are presented here by way ofexample and not limitation. Such networking environments are commonplacein office-wide or enterprise-wide computer networks, intranets and theInternet.

When used in a LAN networking environment, the computer 420 is connectedto the local network 451 through a network interface or adapter 453.When used in a WAN networking environment, the computer 420 may includea modem 454, a wireless link, or other means for establishingcommunications over the wide area network 452, such as the Internet. Themodem 454, which may be internal or external, is connected to the systembus 423 via the serial port interface 446. In a networked environment,program modules depicted relative to the computer 420, or portionsthereof, may be stored in the remote memory storage device. It will beappreciated that the network connections shown are exemplary and othermeans of establishing communications over wide area network 452 may beused.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive. The scope of the invention is, therefore, indicatedby the appended claims rather than by the foregoing description. Allchanges which come within the meaning and range of equivalency of theclaims are to be embraced within their scope.

1. In a system configured to generate code from XML schemas, a methodfor determining equivalence of XML schema types, the method comprising:an act of identifying at least two XML schema types for whichequivalence is to be determined, each of the at least two XML schematypes having at least one schema component that can be presenteddifferently in equivalent XML schema types; a step for normalizing eachof the XML schema types; a step for determining equivalence of the atleast two normalized XML schema types.
 2. A method as recited in claim1, wherein the step for determining equivalence includes creating andcomparing hash numbers of the at least two normalized XML schema types.3. A method as recited in claim 1, wherein the act of identifying theXML schema types includes identifying XML schema types having the sameqname.
 4. A method as recited in claim 1, wherein the step fornormalizing each of the XML schema types includes writing the at leastone schema component in each of at least two XML schema types accordingto a unified format and prior to determining equivalence.
 5. A method asrecited in claim 4, wherein writing the at least one schema componentincludes altering an order of at least two schema components within asingle XML schema type.
 6. A method as recited in claim 5, whereinaltering the order includes placing the at least two schema componentsinto alphabetical order.
 7. A method as recited in claim 5, whereinprior to altering the order, it is determined that the order of the atleast two schema components is discretionary.
 8. A method as recited inclaim 4, wherein the at least one component is a discretionary componentthat is not explicitly recited in at least one of the XML schema types,and wherein writing the at least one schema component includes writingthe at least one schema component for a first time.
 9. A method asrecited in claim 1, further including: upon determining equivalence,creating a single class that is used interchangeably for each equivalentXML schema type.
 10. A computer program product comprising one or morecomputer-readable media having computer-executable instructions forimplementing a method for determining equivalence of XML schema types,the method comprising: an act of identifying at least two XML schematypes for which equivalence is to be determined, each of the at leasttwo XML schema types having at least one schema component that can bepresented differently in equivalent XML schema types; a step fornormalizing each of the XML schema types; a step for determiningequivalence of the at least two normalized XML schema types.
 11. Acomputer program product as recited in claim 10, wherein the step fordetermining equivalence includes creating and comparing hash numbers ofthe at least two normalized XML schema types.
 12. A computer programproduct as recited in claim 10, wherein the step for normalizing each ofthe XML schema types includes writing the at least one schema componentin each of at least two XML schema types according to a unified formatand prior to determining equivalence.
 13. In a system configured togenerate code from XML schemas, a method for determining equivalence ofXML schema types, the method comprising: an act of identifying at leasttwo XML schema types for which equivalence is to be determined, each ofthe at least two XML schema types having at least one schema componentthat can be presented differently in equivalent XML schema types; an actof writing the at least one schema component in each of at least two XMLschema types according to a custom format; an act of comparing the atleast two normalized XML schema types; an act of generating a hashnumber for each of the at least two normalized XML schema types; and anact of determining equivalence of the at least two normalized XML schematypes when the hash number for each of the at least two normalized XMLschema types are the same.
 14. A method as recited in claim 13, whereinthe act of identifying the XML schema types includes identifying XMLschema types having the same qname.
 15. A method as recited in claim 13,wherein writing the at least one schema component includes rewriting anexisting schema component into a new format.
 16. A method as recited inclaim 13, wherein writing the at least one schema component includeswriting a discretionary component into at least one of the XML schematypes.
 17. A method as recited in claim 13, wherein writing the at leastone schema component includes altering an order of at least two schemacomponents within a single XML schema type.
 18. A method as recited inclaim 17, wherein altering the order includes placing the at least twoschema components into alphabetical order.
 19. A method as recited inclaim 17, wherein prior to altering the order, it is determined that theorder of the at least two schema components is discretionary.
 20. Amethod as recited in claim 13, further including: upon determiningequivalence, creating a single class that is used interchangeably foreach equivalent XML schema type.
 21. A method as recited in claim 13,wherein the at least one component is a schema particle definition. 22.A method as recited in claim 13, wherein the at least one component is aschema attribute.
 23. A method as recited in claim 13, wherein the atleast one component is at least one of a child and a sub-child of anamed type.
 24. A computer program product comprising one or morecomputer-readable media having computer-executable instructions forimplementing a method for determining equivalence of XML schema types,the method comprising: an act of identifying at least two XML schematypes for which equivalence is to be determined, each of the at leasttwo XML schema types having at least one schema component that can bepresented differently in equivalent XML schema types; an act of writingthe at least one schema component in each of at least two XML schematypes according to a custom format; an act of comparing the at least twonormalized XML schema types; an act of generating a hash number for eachof the at least two normalized XML schema types; and an act ofdetermining equivalence of the at least two normalized XML schema typeswhen the hash number for each of the at least two normalized XML schematypes are the same.
 25. A computer program product as recited in claim24, wherein, wherein the act of identifying the XML schema typesincludes identifying XML schema types having the same qname.
 26. Acomputer program product as recited in claim 24, wherein writing the atleast one schema component includes rewriting an existing schemacomponent into a new format.
 27. A computer program product as recitedin claim 24, wherein writing the at least one schema component includeswriting a discretionary component into at least one of the XML schematypes.
 28. A computer program product as recited in claim 24, whereinwriting the at least one schema component includes altering an order ofat least two schema components within a single XML schema type.
 29. Acomputer program product as recited in claim 28, wherein altering theorder includes placing the at least two schema components intoalphabetical order.
 30. A computer program product as recited in claim28, wherein prior to altering the order, it is determined that the orderof the at least two schema components is discretionary.
 31. A computerprogram product as recited in claim 24, wherein the method furtherincludes creating a single class that is used interchangeably for eachequivalent XML schema type, upon determining equivalence.